using System;
using System.Collections.Generic;

namespace ACS.Compiler.Tables.Modes
{
    public class StructMode : ContainerMode
    {
        private string _namespace;
        private string _name;
        private List<Field> _fields;

        public StructMode(string ns, string name, List<Field> fields)
        {
            _namespace = ns;
            _name = name;
            _fields = fields;
        }

        public override string ToString()
        {
            return _namespace != null ? _namespace + "." + _name : _name;
        }

        public override StructMode Mode
        {
            get { return this; }
        }

        public string Namespace
        {
            get { return _namespace; }
        }

        public string Name
        {
            get { return _name; }
        }

        public List<Field> Fields
        {
            get { return _fields; }
        }

        public override string ToDeclareFormat()
        {
            return Name;
        }
    }
}